package com.tian.factory.function.factory;

import com.tian.factory.function.product.ICar;
import com.tian.factory.function.product.DaZhongBaolaiCar;
import com.tian.factory.function.product.DaZhongHuiTeng;
import com.tian.factory.function.product.DaZhongSuTeng;

/**
 * @author tiansongtao, Email:tiansongtao@up366.com
 * @date 2020/12/23 20:38
 */
public class DaZhongFactory implements IFactory{

    @Override
    public ICar createProduct(int type) {
        switch (type) {
            case DA_ZHONG_BAO_LAI:
                return new DaZhongBaolaiCar();
            case DA_ZHONG_SU_TENG:
                return new DaZhongSuTeng();
            case DA_ZHONG_HUI_TENG:
                return new DaZhongHuiTeng();
            default:
                return null;
        }
    }
}
